package com.xhwl.centiotdata.service.cent;

/**
 * @Author: luyi
 * @Description:
 * @Date: Create in 19:17 2021/12/15
 */

import com.xhwl.common.dto.cent.sdata.ProjectDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.Account;
import com.xhwl.common.pojo.cent.sdata.Organization;
import com.xhwl.common.pojo.cent.sdata.Project;
import com.xhwl.common.query.cent.sdata.OrganizationQuery;
import com.xhwl.common.query.cent.sdata.ProjectQuery;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.List;

/**
 * @Author:
 * @Description:
 * @Date: Create in 15:14 2021/1/15
 */
@FeignClient(name = "cent-data-core")
public interface IProjectCentService {

    @RequestLine(value = "POST /project-service/find-by-id")
    Project findById(@Param("projectId") Integer projectId);

    @RequestLine(value = "POST /project-service/list")
    List<Project> list(@Param("projectQuery") ProjectQuery projectQuery, @Param("account") Account account);

    @RequestLine(value = "POST /project-service/list")
    List<Project> list(@Param("projectQuery") ProjectQuery projectQuery);

    @RequestLine(value = "POST /project-service/get-one")
    Project getOne(@Param("projectQuery") ProjectQuery projectQuery, @Param("account") Account account);

    @RequestLine(value = "POST /project-service/get-one")
    Project getOne(@Param("projectQuery") ProjectQuery projectQuery);

    @RequestLine(value = "POST /project-service/create")
    ResultJson create(@Param("projectDTO") ProjectDTO projectDTO, @Param("account") Account account);

    @RequestLine(value = "POST /project-service/update")
    ResultJson update(@Param("projectDTO") ProjectDTO projectDTO, @Param("account") Account account);

    @RequestLine(value = "POST /project-service/delete")
    void delete(@Param("id") Integer id, @Param("account") Account account);

    @RequestLine(value = "POST /organization-service/list")
    List<Organization> organizationList(@Param("organizationQuery") OrganizationQuery organizationQuery);
}